package org.dromara.common.mybatis.p6spy;


import com.p6spy.engine.logging.Category;
import lombok.extern.slf4j.Slf4j;

/**
 * Author: fly
 * Date: 2024/3/12
 **/
@Slf4j
public class Slf4jP6spyLogger extends com.p6spy.engine.spy.appender.FormattedLogger {


    @Override
    public void logException(Exception e) {
        log.error(e.getMessage(), e);
    }

    @Override
    public void logText(String text) {
        log.debug(text);
    }

    @Override
    public boolean isCategoryEnabled(Category category) {
        return true;
    }
}
